<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>百分比布局</title>
</head>
<body>
    <div class="main">
         <div>
            我是百分比的文字
         </div>
    </div>
</body>

<style>
    .main{
        width: 100%;
        height: 300px;
        background-color: aqua;
        margin: 0;
    }
</style>
</html>